package function;

public class Rastrigin extends Function{

	public double calculate(double [] inputs)
    {
          double res = 10* inputs.length;
          for (int i = 0; i < inputs.length; i++)
                    res += inputs[i]*inputs[i] - 
                                    10* Math.cos(2*Math.PI*inputs[i]);
          return res;
    }
		
	public double getMinBoudaries() {
		return -5.12;
	}

	
	public double getMaxBoudaries() {
		return 5.12;
	}

	
}
